#include <iostream>
#include <string>
#include "ai_speech.h"
#include "baidu_ai_asr.h"

using namespace std;

int main(int argc, char const *argv[])
{
    AiSpeech ai_speech;

    try
    {
        ai_speech.Start();
        string command;
        while (true)
        {
            cin >> command;
            if (command == "q")
            {
                ai_speech.stop();
                break;
            }
        }
    }
    catch (const std::exception &e)
    {
        ai_speech.stop();
        std::cerr << e.what() << '\n';
    }
    return 0;
}
